﻿<phone:PhoneApplicationPage
    x:Class="Notes.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    >

    <shell:SystemTray.ProgressIndicator>
        <shell:ProgressIndicator IsIndeterminate="True" Text="loading" IsVisible="{Binding IsDataLoaded,Converter={StaticResource InvertBoolean}}" />
    </shell:SystemTray.ProgressIndicator>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Panorama Title="{Binding Path=LocalizedResources.strTitleNotes, Source={StaticResource LocalizedStrings}}">
            <controls:PanoramaItem Header="unsorted">
                <ListBox x:Name="MainListBox" ItemsSource="{Binding Notes}" SelectionChanged="MainListBox_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Width="432" Height="auto">
                                <TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                                <TextBlock Margin="12,0" Text="{Binding Edited}" Foreground="{StaticResource PhoneInactiveBrush}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.add.rest.png" Click="ApplicationBarAdd_Click" Text="Add"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.sync.rest.png" Click="ApplicationBarSync_Click" Text="Sync"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>